<form name="form" class="form-validation">
<div class="modal-header">
    <h3 class="modal-title">修改密码</h3>
</div>
<div class="modal-body">
    <div class="form-group">
        <label>原密码</label>
        <input placeholder="请输入原密码" type="password" class="form-control" ng-model="userpwd.oldPwd" required ng-pattern="/^[a-zA-Z0-9]{6,15}$/">
    </div>
    <div class="form-group">
        <label>新密码 <em class="text-muted">(请输入6-15位字母或数字)</em></label>
        <input placeholder="请输入新密码" type="password" class="form-control" ng-model="userpwd.newPwd" required ng-pattern="/^[a-zA-Z0-9]{6,15}$/">
    </div>
    <div class="form-group">
        <label>再次输入密码</label>
        <input placeholder="请再次输入密码" type="password" class="form-control" ng-model="userpwd.newPwd2" required ng-pattern="/^[a-zA-Z0-9]{6,15}$/">
    </div>
    <span ng-show="userpwd.newPwd != userpwd.newPwd2" style="color: red">两次密码不一致</span>
</div>
<div class="modal-footer">
    <button class="btn btn-default" ng-click="cancel()">取消</button>
    <button type="button" class="btn btn-primary" ng-disabled="form.$invalid || userpwd.newPwd != userpwd.newPwd2" ng-click="ok()">提交</button>
</div>
</form>